
def stat01(s):
    dAnswer = {}
    for c in s:
        if c not in dAnswer.keys():
            dAnswer[c] = 1
        else:
            dAnswer[c] += 1
    return dAnswer

def stat02(s):
    dAnswer = {}
    for c in s:
        dAnswer[c] = dAnswer.get(c, 0) + 1       
    return dAnswer

def stat03(s):
    dAnswer = {}
    for c in s:
        dAnswer.setdefault(c,0)
        dAnswer[c] += 1
    return dAnswer


mydict1 = stat01('The quick brown fox jumps over the lazy dog')
mydict2 = stat02('The quick brown fox jumps over the lazy dog')
mydict3 = stat03('The quick brown fox jumps over the lazy dog')
print(mydict1)
print(mydict2)
print(mydict3)



